package com.example.demo.model;

import lombok.Data;

import java.util.Objects;

/**
 * @author luowj12
 * @since 2021/4/6 9:37
 */
@Data
public class Student {
    private String name;
    private double salary;
    private int sex;

    private LoginInfo loginInfo;

    public Student (String name){
        this.name =name;
    }
    public Student (String name,int sex){
        this.sex =sex;
        this.name =name;
    }

    public Student(String name, double salary, int sex) {
        this.name = name;
        this.salary = salary;
        this.sex = sex;
    }

    @Override
    public int hashCode() {
        //return name.hashCode() + new Double(salary).hashCode() + new Integer(sex).hashCode();
        //return Objects.hashCode(name) + new Double(salary).hashCode() + new Integer(sex).hashCode();
        return Objects.hash(name,salary,sex);
    }

}
